package com.ssy.lingxi.member.merchant.api.model.vo.inner.request;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.List;

/**
 *  会员权益积分消费VO-积分抵扣订单金额（不是积分订单）
 * @author ds
 * @date 2022/3/1
 * @version 2.0.0
 */
public class MemberFeignRightDeductionVO implements Serializable {

    private static final long serialVersionUID = -7274123347169220019L;
    /**
     * 买方会员Id
     */
    @NotNull(message = "买方的会员角色Id要大于0")
    @Positive(message = "买方的会员角色Id要大于0")
    private Long subMemberId;

    /**
     * 买方会员角色Id
     */
    @NotNull(message = "买方的会员角色Id要大于0")
    @Positive(message = "买方的会员角色Id要大于0")
    private Long subRoleId;

    /**
     * 积分类型：0-平台积分，1-会员积分
     */
    @NotNull(message = "积分类型：0-平台积分，1-会员积分")
    @Min(value = 0, message = "积分类型：0-平台积分，1-会员积分")
    @Max(value = 1, message = "积分类型：0-平台积分，1-会员积分")
    private Integer relType;

    /**
     * 抵扣积分的店铺会员信息
     */
    @Valid
    @NotNull(message = "抵扣积分的店铺会员信息必填")
    @Size(min = 1,message = "抵扣积分的店铺会员信息必填")
    private List<MemberFeignRightDeductionItemVO> itemList;

    public Long getSubMemberId() {
        return subMemberId;
    }

    public void setSubMemberId(Long subMemberId) {
        this.subMemberId = subMemberId;
    }

    public Long getSubRoleId() {
        return subRoleId;
    }

    public void setSubRoleId(Long subRoleId) {
        this.subRoleId = subRoleId;
    }

    public Integer getRelType() {
        return relType;
    }

    public void setRelType(Integer relType) {
        this.relType = relType;
    }

    public List<MemberFeignRightDeductionItemVO> getItemList() {
        return itemList;
    }

    public void setItemList(List<MemberFeignRightDeductionItemVO> itemList) {
        this.itemList = itemList;
    }
}
